package com.xzh.wms.service;

import com.xzh.wms.dto.InventoryOptionDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xzh.wms.entity.*;
import com.xzh.wms.dao.InventoryDao;
import java.util.List;
import java.util.Map;

/**
 * 库存表;(206_inventory)表服务实现类
 * @author : heimi
 * @date : 2024-11-29
 */
@Service
public class InventoryService {
     
    @Autowired
    private InventoryDao inventoryDao;

    @Autowired
    private Map<String,IInventoryOptionService> inventoryOptionServiceMap;
    
    public List<Inventory> select(InventoryQuery query) {
        return inventoryDao.select(query);
    }
    
    public Integer process(InventoryOptionDTO dto) {
        String type = dto.getOptionType();
        IInventoryOptionService iInventoryOptionService = inventoryOptionServiceMap.get(type);
        iInventoryOptionService.process(dto);
        return 0;
    }

    
 
}